import './App.css';
import {
  BrowserRouter,
  Routes,
  Route
} from "react-router-dom";
import {Result} from "antd";
import Hole from "./pages/Hole";
import React from "react";
import Recover from "./pages/Recover";

function App() {
  return (
    <BrowserRouter basename={'/toy'}>
        {/* A <Switch> looks through its children <Route>s and
         renders the first one that matches the current URL. */}
         <Routes>
           <Route path="/hole-img" element={
             <Hole />}
           />
           <Route path="/recover" element={
             <Recover />}
           />
           <Route path="*" element={
             <Result
               status="404"
               title="404"
               subTitle="Sorry, the page you visited does not exist."
             />}
           />
         </Routes>
    </BrowserRouter>
  );
}

export default App;
